# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=xf86-video-sis
pkgver=0.12.0
pkgrel=1
pkgdesc="X.org SiS video driver"
url="https://xorg.freedesktop.org"
arch="all"
license="MIT"
subpackages="$pkgname-doc"
makedepends="xorg-server-dev util-macros mesa-dev libxi-dev xorgproto"
source="https://www.x.org/releases/individual/driver/xf86-video-sis-$pkgver.tar.bz2
	fix-old-cpp-macros.patch
	"

build() {
	export LDFLAGS="$LDFLAGS -Wl,-z,lazy"

	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
}
sha512sums="5aa101e5217f15667f2c94f7a76f4afcf47717b61f5d206ce65efe35dc3f674ca294f98ca8586971c6467f31decdd94d8255ebfc7dc220fac0179afc61995952  xf86-video-sis-0.12.0.tar.bz2
d4262ac8c17d04547473df260518247afb09a5bf6ddbe85d7877534f1e99d316d52fb933839f56a4e61b3706b124fa91c6926d432ba542e525f2007af253ff2a  fix-old-cpp-macros.patch"
